<?php
// src/RSP/UserBundle/Entity/User.php

namespace RSP\UserBundle\Entity;

use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;

/**
 * Rs\UserBundle\Entity\User
 * 
 * @ORM\Table(name="fos_user")
 * @ORM\Entity()
 */
class User extends BaseUser
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;
    /**
   
  
  
  /**
   * @ORM\OneToMany(targetEntity="RSP\ReseauSocialBundle\Entity\Message",mappedBy="user")
   * @ORM\joinColumn(nullable=false)
   */
  private $messages;
  
  /**
   * @ORM\ManyToMany(targetEntity="RSP\ReseauSocialBundle\Entity\Commentaire", cascade={"persist"})
   */
  private $commentaires;
   /**
   * @ORM\OneToMany(targetEntity="RSP\UserBundle\Entity\UserEcole",mappedBy="user", cascade={"persist"})
   */
  private $usersecoles;
  /**
   * @ORM\OneToMany(targetEntity="RSP\UserBundle\Entity\UserUniversite",mappedBy="user", cascade={"persist"})
   */
  private $usersuniversites;
 
  
  
  /**
   * @ORM\ManyToMany(targetEntity="RSP\ReseauSocialBundle\Entity\Demandeamitie", cascade={"persist"})
   */
  private $demandes;
  
  /**
   * @ORM\ManyToMany(targetEntity="RSP\ReseauSocialBundle\Entity\ActiviteRecente", cascade={"persist"})
   */
  private $activites;
  
  /**
   * @ORM\ManyToMany(targetEntity="RSP\ReseauSocialBundle\Entity\Groupe", cascade={"persist"})
   */
  private $groupes;
   
      
      /**
     * @var string $type
     *
     * @ORM\Column(name="type", type="string", length=255)
     */
    protected $type;
     /**
     * @var string $nom
     *
     * @ORM\Column(name="nom", type="string", length=255)
     */
    protected $nom;
     /**
     * @var string $date
     *
     * @ORM\Column(name="date", type="date")
     */
    protected $date;
    /**
     * @var string $prenom
     *
     * @ORM\Column(name="prenom", type="string", length=255)
     */
    protected $prenom;
    
    /**
     * @var string $telephone
     *
     * @ORM\Column(name="telephone", type="string", length=255)
     */
    protected $telephone;
    
    /**
     * @var string $adresse
     *
     * @ORM\Column(name="adresse", type="string", length=255)
     */
    protected $adresse;
    /**
     * @var string $sex
     *
     * @ORM\Column(name="sex", type="string", length=255)
     */
    protected $sex;
    /**
     * @ORM\ManyToOne(targetEntity="RSP\ReseauSocialBundle\Entity\Pays",inversedBy="users")
     *@ORM\joinColumn(nullable=false)
     */
    protected $pays;
    /**
     * @var string $remarques
     *
     * @ORM\Column(name="remarques", type="string", length=255)
     */
    protected $remarques;
 /**
     * @ORM\ManyToOne(targetEntity="RSP\ReseauSocialBundle\Entity\Ville",inversedBy="users")
     *@ORM\joinColumn(nullable=false)
     */
     private $ville;
   
    /**
     * Constructor
     */
    public function __construct()
    {
        parent::__construct();
        $this->messages = new \Doctrine\Common\Collections\ArrayCollection();
        $this->commentaires = new \Doctrine\Common\Collections\ArrayCollection();
        $this->usersecoles = new \Doctrine\Common\Collections\ArrayCollection();
        $this->demandes = new \Doctrine\Common\Collections\ArrayCollection();
        $this->activites = new \Doctrine\Common\Collections\ArrayCollection();
        $this->groupes = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set type
     *
     * @param string $type
     * @return User
     */
    public function setType($type)
    {
        $this->type = $type;
    
        return $this;
    }

    /**
     * Get type
     *
     * @return string 
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Set nom
     *
     * @param string $nom
     * @return User
     */
    public function setNom($nom)
    {
        $this->nom = $nom;
    
        return $this;
    }

    /**
     * Get nom
     *
     * @return string 
     */
    public function getNom()
    {
        return $this->nom;
    }

    /**
     * Set date
     *
     * @param \DateTime $date
     * @return User
     */
    public function setDate($date)
    {
        $this->date = $date;
    
        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime 
     */
    public function getDate()
    {
        return $this->date;
    }

    /**
     * Set prenom
     *
     * @param string $prenom
     * @return User
     */
    public function setPrenom($prenom)
    {
        $this->prenom = $prenom;
    
        return $this;
    }

    /**
     * Get prenom
     *
     * @return string 
     */
    public function getPrenom()
    {
        return $this->prenom;
    }

    /**
     * Set telephone
     *
     * @param string $telephone
     * @return User
     */
    public function setTelephone($telephone)
    {
        $this->telephone = $telephone;
    
        return $this;
    }

    /**
     * Get telephone
     *
     * @return string 
     */
    public function getTelephone()
    {
        return $this->telephone;
    }

    /**
     * Set adresse
     *
     * @param string $adresse
     * @return User
     */
    public function setAdresse($adresse)
    {
        $this->adresse = $adresse;
    
        return $this;
    }

    /**
     * Get adresse
     *
     * @return string 
     */
    public function getAdresse()
    {
        return $this->adresse;
    }

    /**
     * Set sex
     *
     * @param string $sex
     * @return User
     */
    public function setSex($sex)
    {
        $this->sex = $sex;
    
        return $this;
    }

    /**
     * Get sex
     *
     * @return string 
     */
    public function getSex()
    {
        return $this->sex;
    }

    /**
     * Set remarques
     *
     * @param string $remarques
     * @return User
     */
    public function setRemarques($remarques)
    {
        $this->remarques = $remarques;
    
        return $this;
    }

    /**
     * Get remarques
     *
     * @return string 
     */
    public function getRemarques()
    {
        return $this->remarques;
    }

    /**
     * Add messages
     *
     * @param \RSP\ReseauSocialBundle\Entity\Message $messages
     * @return User
     */
    public function addMessage(\RSP\ReseauSocialBundle\Entity\Message $messages)
    {
        $this->messages[] = $messages;
    
        return $this;
    }

    /**
     * Remove messages
     *
     * @param \RSP\ReseauSocialBundle\Entity\Message $messages
     */
    public function removeMessage(\RSP\ReseauSocialBundle\Entity\Message $messages)
    {
        $this->messages->removeElement($messages);
    }

    /**
     * Get messages
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getMessages()
    {
        return $this->messages;
    }

    /**
     * Add commentaires
     *
     * @param \RSP\ReseauSocialBundle\Entity\Commentaire $commentaires
     * @return User
     */
    public function addCommentaire(\RSP\ReseauSocialBundle\Entity\Commentaire $commentaires)
    {
        $this->commentaires[] = $commentaires;
    
        return $this;
    }

    /**
     * Remove commentaires
     *
     * @param \RSP\ReseauSocialBundle\Entity\Commentaire $commentaires
     */
    public function removeCommentaire(\RSP\ReseauSocialBundle\Entity\Commentaire $commentaires)
    {
        $this->commentaires->removeElement($commentaires);
    }

    /**
     * Get commentaires
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getCommentaires()
    {
        return $this->commentaires;
    }

    /**
     * Add usersecoles
     *
     * @param \RSP\UserBundle\Entity\UserEcole $usersecoles
     * @return User
     */
    public function addUsersecole(\RSP\UserBundle\Entity\UserEcole $usersecoles)
    {
        $this->usersecoles[] = $usersecoles;
         $usersecoles->setUser($this);
        return $this;
    }

    /**
     * Remove usersecoles
     *
     * @param \RSP\UserBundle\Entity\UserEcole $usersecoles
     */
    public function removeUsersecole(\RSP\UserBundle\Entity\UserEcole $usersecoles)
    {
        $this->usersecoles->removeElement($usersecoles);
        
    }

    /**
     * Get usersecoles
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getUsersecoles()
    {
        return $this->usersecoles;
    }

    /**
     * Add demandes
     *
     * @param \RSP\ReseauSocialBundle\Entity\Demandeamitie $demandes
     * @return User
     */
    public function addDemande(\RSP\ReseauSocialBundle\Entity\Demandeamitie $demandes)
    {
        $this->demandes[] = $demandes;
    
        return $this;
    }

    /**
     * Remove demandes
     *
     * @param \RSP\ReseauSocialBundle\Entity\Demandeamitie $demandes
     */
    public function removeDemande(\RSP\ReseauSocialBundle\Entity\Demandeamitie $demandes)
    {
        $this->demandes->removeElement($demandes);
    }

    /**
     * Get demandes
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getDemandes()
    {
        return $this->demandes;
    }

    /**
     * Add activites
     *
     * @param \RSP\ReseauSocialBundle\Entity\ActiviteRecente $activites
     * @return User
     */
    public function addActivite(\RSP\ReseauSocialBundle\Entity\ActiviteRecente $activites)
    {
        $this->activites[] = $activites;
    
        return $this;
    }

    /**
     * Remove activites
     *
     * @param \RSP\ReseauSocialBundle\Entity\ActiviteRecente $activites
     */
    public function removeActivite(\RSP\ReseauSocialBundle\Entity\ActiviteRecente $activites)
    {
        $this->activites->removeElement($activites);
    }

    /**
     * Get activites
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getActivites()
    {
        return $this->activites;
    }

    /**
     * Add groupes
     *
     * @param \RSP\ReseauSocialBundle\Entity\Groupe $groupes
     * @return User
     */
    public function addGroupe(\RSP\ReseauSocialBundle\Entity\Groupe $groupes)
    {
        $this->groupes[] = $groupes;
    
        return $this;
    }

    /**
     * Remove groupes
     *
     * @param \RSP\ReseauSocialBundle\Entity\Groupe $groupes
     */
    public function removeGroupe(\RSP\ReseauSocialBundle\Entity\Groupe $groupes)
    {
        $this->groupes->removeElement($groupes);
    }

    /**
     * Get groupes
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getGroupes()
    {
        return $this->groupes;
    }

    /**
     * Set pays
     *
     * @param \RSP\ReseauSocialBundle\Entity\Pays $pays
     * @return User
     */
    public function setPays(\RSP\ReseauSocialBundle\Entity\Pays $pays)
    {
        $this->pays = $pays;
    
        return $this;
    }

    /**
     * Get pays
     *
     * @return \RSP\ReseauSocialBundle\Entity\Pays 
     */
    public function getPays()
    {
        return $this->pays;
    }

    /**
     * Set ville
     *
     * @param \RSP\ReseauSocialBundle\Entity\Ville $ville
     * @return User
     */
    public function setVille(\RSP\ReseauSocialBundle\Entity\Ville $ville)
    {
        $this->ville = $ville;
    
        return $this;
    }

    /**
     * Get ville
     *
     * @return \RSP\ReseauSocialBundle\Entity\Ville 
     */
    public function getVille()
    {
        return $this->ville;
    }


    /**
     * Add usersuniversites
     *
     * @param \RSP\UserBundle\Entity\UserUniversite $usersuniversites
     * @return User
     */
    public function addUsersuniversite(\RSP\UserBundle\Entity\UserUniversite $usersuniversites)
    {
        $this->usersuniversites[] = $usersuniversites;
    
        return $this;
    }

    /**
     * Remove usersuniversites
     *
     * @param \RSP\UserBundle\Entity\UserUniversite $usersuniversites
     */
    public function removeUsersuniversite(\RSP\UserBundle\Entity\UserUniversite $usersuniversites)
    {
        $this->usersuniversites->removeElement($usersuniversites);
    }

    /**
     * Get usersuniversites
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getUsersuniversites()
    {
        return $this->usersuniversites;
    }

    /**
     * Set photo
     *
     * @param string $photo
     * @return User
     */
    public function setPhoto($photo)
    {
        $this->photo = $photo;
    
        return $this;
    }

    /**
     * Get photo
     *
     * @return string 
     */
    public function getPhoto()
    {
        return $this->photo;
    }
}